package com.big_data_studio.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <h2>角色</h2>
 *
 * @author 彭畅
 * @since 2022-10-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_role")
public class Role implements Serializable {

    /**
     * <h3>版本控制</h3>
     */
    private static final long serialVersionUID = 1L;

    /**
     * <h3>角色编号</h3>
     */
    @TableId(value = "id", type = IdType.AUTO)
    @NotNull
    private Integer id;

    /**
     * <h3>角色名</h3>
     */
    private String roleName;

    /**
     * <h3>角色状态（0正常 1停用）</h3>
     */
    private Boolean status;

    /**
     * <h3>创建人</h3>
     */
    private String createName;

    /**
     * <h3>创建时间</h3>
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")  // 返回给前端的时候进行格式化
    private LocalDateTime createTime;

    /**
     * <h3>修改人</h3>
     */
    private String updateName;

    /**
     * <h3>修改时间</h3>
     */
    // @JsonFormat(pattern = "yyyy-MM-dd")  // 返回给前端的时候进行格式化
    private LocalDateTime updateTime;

    /**
     * <h3>逻辑删除（1：已删除 0：未删除）</h3>
     */
    private Boolean isDelete;

    /**
     * <h3>备注</h3>
     */
    private String remark;

}
